-
Notifications
You must be signed in to change notification settings - Fork 282
Refine all matmul and binary ops #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
relevant UT: |
68fb1cf
to
e24f42d
Compare
@EikanWang The PR is ready for review. PTAL. |
|
@@ -89,6 +89,15 @@ void reorder_to_desc(const at::Tensor& tensor, const dil::tensor::desc& expected | |||
} | |||
|
|||
void equip_dil_buffer(const at::Tensor& tensor, dil::tensor dil_tensor_buffer) { | |||
TORCH_INTERNAL_ASSERT_DEBUG_ONLY( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we user TORCH_CHECK here?
// After equip_dil_buffer(), whole storage should be managed by dil tensor, | ||
// and thus storage metadata should be overwritten by dil tensor | ||
// Note: Storage::set_numel() might be removed later | ||
ipex_tensor_impl->storage().set_numel(dil_tensor_buffer.get_nelems()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean the number of elements of dil tensor will not be as same as the number of ATen tensor (dilation/padding) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may pass a dummy tensor with zero size as output and let our ops to replace its buffer with concrete sizes.
LGTM |
* add ops into blacklist * clean format * remove tok from blacklist
Fix #9
Fix #48
Fix #50